﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Vision.Common
{
    public static class NodeLibManager
    {
        public static List<NodeLib> nodeLibs = new List<NodeLib>();
        public static int GetMaxID()
        {
            int res = 0;
            if(nodeLibs.Count>0)
                res = nodeLibs.Max(p => p.ID);
            return res;
        }

        public static NodeLib Find(int ID)
        {
            try
            {
                return nodeLibs.First(p => p.ID == ID);
            }
            catch(Exception ex)
            {
                return null;
            }
            
        }
    }
}
